package edu.hnu.tradeserver.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

@TableName(value ="test")
@Data
public class Test implements Serializable {

    @TableField(value = "client_name")
    private String clientName;

    @TableField(value = "ticker")
    private String ticker;

    @TableField(value = "ric")
    private String ric;

    @TableField(value = "size")
    private String size;

    @TableField(value = "price")
    private BigDecimal price;

    @TableField(value = "currency")
    private BigDecimal currency;

    @TableField(value = "issuer_sector")
    private String issuerSector;

    @TableField(value = "salesperson")
    private String salesperson;

    @TableField(value = "ht_pt")
    private String ht_pt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Test other = (Test) that;
        return (this.getClientName() == null ? other.getClientName() == null : this.getClientName().equals(other.getClientName()))
            && (this.getTicker() == null ? other.getTicker() == null : this.getTicker().equals(other.getTicker()))
            && (this.getRic() == null ? other.getRic() == null : this.getRic().equals(other.getRic()))
            && (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
            && (this.getIssuerSector() == null ? other.getIssuerSector() == null : this.getIssuerSector().equals(other.getIssuerSector()))
            && (this.getSalesperson() == null ? other.getSalesperson() == null : this.getSalesperson().equals(other.getSalesperson()))
            && (this.getHt_pt() == null ? other.getHt_pt() == null : this.getHt_pt().equals(other.getHt_pt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getClientName() == null) ? 0 : getClientName().hashCode());
        result = prime * result + ((getTicker() == null) ? 0 : getTicker().hashCode());
        result = prime * result + ((getRic() == null) ? 0 : getRic().hashCode());
        result = prime * result + ((getSize() == null) ? 0 : getSize().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
        result = prime * result + ((getIssuerSector() == null) ? 0 : getIssuerSector().hashCode());
        result = prime * result + ((getSalesperson() == null) ? 0 : getSalesperson().hashCode());
        result = prime * result + ((getHt_pt() == null) ? 0 : getHt_pt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", clientName=").append(clientName);
        sb.append(", ticker=").append(ticker);
        sb.append(", ric=").append(ric);
        sb.append(", size=").append(size);
        sb.append(", price=").append(price);
        sb.append(", currency=").append(currency);
        sb.append(", issuerSector=").append(issuerSector);
        sb.append(", salesperson=").append(salesperson);
        sb.append(", ht_pt=").append(ht_pt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}